home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / mathstud.zip / FFTSHIFT.M < prev    next >
Text File  |  1993-03-23  |  259b  |  13 lines

  1. function y = fftshift(x)
  2. % y=fftshift(x)
  3. % rotates a 2D array to center the output of the FFT
  4.  
  5. %       S.Halevy 7/31/92
  6. %       Copyright (c) 1992 by the MathWizards
  7.  
  8. [m,n] = size(x);
  9. m1 = m/2;
  10. n1 = n/2;
  11. y=x<>[m1,n1];    % not portable to MATLAB
  12.  
  13.